#include <stdio.h>
#include <GL/glfw.h>
//#include <emscripten/emscripten.h>

typedef void (*renderFunc)();

void doRenderingLoop(renderFunc doRendering) {
    /* Loop until the user closes the window */
    int num = 0;
    float time = glfwGetTime();
    while (glfwGetWindowParam( GLFW_OPENED ))
    {
        doRendering();
        num++;
        if(num==100)
        {
            printf("%f", glfwGetTime() - time);
        }
    }
}
